﻿@model IEnumerable<CEntidades.eProducto>

@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>ListaProductos</title>
</head>
<body>
    <table>
        @{
            int numfilas = 0;
            foreach(var m in Model){
                if(numfilas==0){
                    <tr></tr>
                }
                numfilas++;
                <td align="center" width="33%">
                    <img src = "../../Imagenes/producto/@Html.DisplayFor(modelitem => m.Imagen)" width="80%" />
                    <br /><p style="color:Gray; font-family:Arial; font-size: 12px;">@Html.DisplayFor(modelitem => m.Nombre)</p>
                    @if (Session["usuario"] !=null) { 
                        <form method="POST" action="">
                            <p style="color:Gray; font-family:Arial; font-size: 12px;">Precio: @Html.DisplayFor(modelitem => m.Precio)</p>
                            <input type="text" name="txtcant" value="1" style="width: 40px" />
                            <input type="submit" name="btnAgregar" value="Agregar" style="width: 60px; background-color: #FEAD1D"/>
                            <input type="hidden" name="txtid" value="@Html.ValueFor(modelitem => m.Precio)" style="width: 40px" />
                        </form>
                    }
                </td>
                    if (numfilas == 3)
                    {
                    <tr></tr>
                }
            }
        }
    </table>
</body>
</html>
